<?php
/**
 * Created By PhpStorm
 * Author: patrick wu
 * Date: 2020/9/29
 * Time: 16:21
 */
namespace App\Http\Model\Mysql;

use Illuminate\Database\Eloquent\Model;

class OrderIncomeModel extends Model
{
    const REWARD_PROMOTE    =   1,      //分佣奖励
        REWARD_INVITE       =   2;      //邀请奖励

    const STATUS_LOCk       =   0,      //待处理
        STATUS_DEAL         =   1;      //已处理

    protected $table    =   'mini_order_income';

    protected $guarded  =   [];

    protected $dateFormat   =   'U';

    protected $primaryKey   =   'inid';

    /**
     * 定义连接订单表
     * @return \Illuminate\Database\Eloquent\Relations\HasOne
     */
    public function order()
    {
        return $this->hasOne(OrderModel::class, 'id', 'oid');
    }
}
